<%--
  Created by IntelliJ IDEA.
  User: jp137
  Date: 2018/10/2
  Time: 22:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>客户管理</title>
    <link href="bootstrap-4.1.3-dist/css/bootstrap.min.css" rel="stylesheet" media="screen">
    <script src="js/jquery-3.3.1.min.js"></script>
    <script src="bootstrap-4.1.3-dist/js/bootstrap.min.js"></script>
</head>
<body>
<table class="table table-striped">
    <tr>
        <th style="text-align: center">客户id</th>
        <th style="text-align: center">客户姓名</th>
        <th style="text-align: center">客户联系人</th>
        <th style="text-align: center">客户电话</th>
        <th style="text-align: center">客户邮箱</th>
        <th style="text-align: center">备注</th>
        <th style="text-align: center">操作</th>
    </tr>
    <c:if test="${!empty CustomerList}">
        <c:forEach items="${CustomerList}" var="customer">
            <tr>
                <td align="center">${customer.id}</td>
                <td align="center">${customer.name}</td>
                <td align="center">${customer.contact}</td>
                <td align="center">${customer.telephone}</td>
                <td align="center">${customer.email}</td>
                <td align="center">${customer.remake}</td>
                <td align="center">
                    <a href="CustomerServlet?type=updatePage&id=${customer.id}">修改</a>
                    <a href="CustomerServlet?type=delete&id=${customer.id}">删除</a>
                </td>
            </tr>
        </c:forEach>
    </c:if>
    <c:if test="${empty CustomerList}">
        <tr>
            <td colspan="7" align="center">没有客户数据！</td>
        </tr>
    </c:if>
</table>
<a href="CustomerServlet?type=insertPage">新增客户</a>
</body>
</html>
